package Collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class try2 {
    public static void main(String[] args) {
        List<String> names =new ArrayList<>();
        // Alladd()向集合中一次性添加多个元素
        Collections.addAll(names,"李白","黧黑","李女");
        System.out.println(names);
        // shuffle(List<?> List):打乱list集合得顺序
        Collections.shuffle(names);
        System.out.println(names);
        //sort对list集合进行排序
    }
}
